home *** CD-ROM | disk | FTP | other *** search
- /*•••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
- /* Offscreen.h
- /*
- /* Yet another offscreen drawing module that uses GWorld to eliminate drawing flicker.
- /*
- /* Basic calling sequence is the following:
- /* InitOffscreen (...);
- /* window = GetNewWindow (...);
- /* CheckOffscreenForWindow (&gWorld, window, ...);
- /* while (1) {
- /* CheckOffscreenForWindow (&gWorld, window, ...);
- /* BeginDrawingOffscreen (&gWorld, window);
- /* ... Draw Something ...
- /* EndDrawingOffscreen (&gWorld, window);
- /* }
- /* FreeOffscreen (&gWorld);
- /*
- /* Author: Michael Chen, Human Interface Group / ATG
- /* Copyright © 1991-1993 Apple Computer, Inc. All rights reserved.
- /*
- /* Part of Virtual Sphere Sample Code Release v1.1
- /*•••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••*/
-
- #ifndef __OFFSCREEN__
- #define __OFFSCREEN__
-
- #ifndef __GLOBALS__
- #include "Globals.h"
- #endif
-
- #ifndef __QDOFFSCREEN__
- #include <QDOffscreen.h>
- #endif
-
- /* Must be called before any other routines in this module. The other
- * routines should not be called if GWorld is not available */
- pascal OSErr InitializeOffscreen (Boolean *gWorldAvailable);
-
- pascal void FreeOffscreen (GWorldPtr offscreenGWorld);
-
- pascal QDErr CheckOffscreenForWindow (GWorldPtr *offscreenGWorld,
- short pixelDepth,
- WindowPtr window);
-
- pascal void BeginDrawingOffscreen (GWorldPtr offscreenGWorld, WindowPtr window);
- pascal void EndDrawingOffscreen (GWorldPtr offscreenGWorld, WindowPtr window);
-
-
-
- #endif __OFFSCREEN__
-